import request from '@/utils/request'

// 查询药物信息列表
export function listMedinfo(query) {
  return request({
    url: '/medmanage/medinfo/list',
    method: 'get',
    params: query
  })
}

// 查询药物信息详细
export function getMedinfo(medId) {
  return request({
    url: '/medmanage/medinfo/' + medId,
    method: 'get'
  })
}

// 新增药物信息
export function addMedinfo(data) {
  return request({
    url: '/medmanage/medinfo',
    method: 'post',
    data: data
  })
}

// 修改药物信息
export function updateMedinfo(data) {
  return request({
    url: '/medmanage/medinfo',
    method: 'put',
    data: data
  })
}

// 删除药物信息
export function delMedinfo(medId) {
  return request({
    url: '/medmanage/medinfo/' + medId,
    method: 'delete'
  })
}
